<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script src="../js/mui.min.js"></script>
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/style.css" />
		<link rel="stylesheet" href="../css/iconfont.css" />
		<link rel="stylesheet" href="../css/shop.css" />
		<link rel="stylesheet" href="../css/index.css" />
		<link rel="stylesheet" href="../css/member.css" />
	</head>
	<style>
		.shop_liansuodlis a div {
			float: left;
			width: 25%;
			color: #666666;
		}
		
		.xuanf {
			position: fixed;
			bottom: 15%;
			right: 3%;
			width: 12%;
			z-index: 999;
			opacity: 0.9;
		}
		
		.shopb_t_l {
			float: none;
			width: 100%;
			padding: 3% 3% 0;
			display: table;
		}
		
		.shopb_img {
			width: 70px;
			display: table-cell;
			border: 0;
			vertical-align: middle;
			float: none;
			height: 70px;
			padding-right: 5px;
			margin-right: 0;
		}
		
		.shopb_img img {
			border: 1px solid #E9E7E7;
			border-radius: 5px;
			width: 68px;
			height: 68px;
		}
		
		.shopb_info {
			width: 100%;
			display: table-cell;
			float: none;
			vertical-align: middle;
		}
		
		.shopb_youh em {
			color: #FF5A00;
		}
		
		.shopb_info .shopb_nam {
			font-size: 14px;
		}
		
		.index_spadr_l {
			line-height: 15px;
			max-height: 30px;
			overflow: hidden;
		}
	</style>

	<body>
		<div class="wrap">
			<header class="mui-bar mui-bar-nav">
				<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
				<h1 class="mui-title" id="store_name">店铺</h1>
			</header>

			<div class="mui-content shop_con">
					<div class="mem_top">
						<div class="mem_infobox clearfix" id="divId">
							<div class="mem_toux"><img id="touxiang" src=""+APP.web_root+"../images/b002.jpg"></div>
							<div class="mem_info">
								<p class="mem_name" id="shop_name"></p>
							    <p class="mem_name" id="shop_level"></p>
							</div>
						</div>
		<div class="shop_sjlisbt clearfix zuix" style="background: #ffffff;"><span class="iconfont icon-icon"></span><i></i>最新产品</div>			
					</div>
				<div id="slider" class="mui-slider shop_slider">
				</div>
				<div class="shop_sjlisbox">
					
					
					<ul class="list_list clearfix" id="pintuan_ul">
						<div class="shop_sjlisnone" id="no_goods">该商铺还未上传任何商品~
						</div>
						
					</ul>
				</div>
				<div id="footer"></div>
			</div>
			<!--<div class="xuanf">
				<ul class="xuanfu_list">
					
					<li>
						<a id="to_top" href="#"><span class="iconfont icon-jiantou-copy"></span></a>
					</li>
				</ul>
			</div>-->
		</div>
		<div id="footer"></div>
	</body>

</html>
<script type="text/javascript" src="../js/castapp.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/app.js"></script>
<script type="text/javascript" src="../js/layer/layer.min.js"></script>
<script type="text/javascript">
getFoot(getUrlParam("foot_active") > 0 ? getUrlParam("foot_active") : 2);
var shop_id=localStorage.getItem("shop_id");
	$(function() {
		


		var loading = layer.load(0, {
			shade: false,
			time: 1 * 1000
		});
		$(".layui-layer-loading").css("left", "45%");
		ca.init();
		castapp.pictureScroll({
			callback: function(pictureNumber) {
				//console.log(pictureNumber);
			},
			isAutoScroll: true,
			scrollTime: 3
		});
	
		$.ajax({
			type: 'post',
			url: APP.api_url + 'Member/shop_goods',
			data: {shop_id:shop_id},
			dataType:'jsonp',
			success: function(data) {
			var json=data.data;
			var html="";
					for(var i=0;i<json[0].length;i++){
						var strs=json[0][i].content.split("@");
						html+='<a href="../goods/goodshow.html?goods_id=' + json[0][i].id  + '"><div class="mui-card-header mui-card-media">'+
							'<img src="'+APP.pic_url+strs[0]+ '" />'+
								'<div class="mui-media-body">' + json[0][i].price+ '<div class="list">¥<em>' + json[0][i].price + '/'+json[0][i].unit+'</em></div>'+ '<p>上市时间： '+json[0][i].sctime+'</p></div></div></a>';
								'<li style=" border:red solid 1px; width: 45%;height: 200px; float: left;margin-left:2.5%;">'+
						'<a href="../goods/goodshow.html?goods_id=' + json[0][i].id + '">'+
							'<img src="'+APP.pic_url+strs[0]+'" style="width: 100%;height: 150px;" ><h1>'+json[0][i]['goods_name']+'</h1>'+
							
							'</a></li>';
					}
					document.getElementById("store_name").innerHTML=json[1].company;
					document.getElementById("shop_name").innerHTML='名称：'+json[1].company;
					document.getElementById("shop_level").innerHTML='地址：'+json[1].address;
					$("#touxiang").attr("src", APP.pic_url + json[1].pic);
					document.getElementById("pintuan_ul").innerHTML=html;
					$("#divId").attr("style","background:url('../images/b001.jpg') no-repeat;width:100%;height:128px;");
					if(json[1].company_type=='3'){
						func3(json[1].id);
					}
			}
		});
		
		
});
	
	
	function func3(id){
		$.ajax({
			type: 'post',
			url: APP.api_url + 'Member/shop_fuws',
			data: {shop_id:shop_id},
			dataType:'jsonp',
			success: function(data) {
			var json=data.data;
			var tml='		<div class="shop_sjlisbt clearfix zuix" style="background: #ffffff;"><span class="iconfont icon-icon"></span><i></i>最新服务</div>	';
					for(var i=0;i<json.length;i++){
						var strs=json[i].pic.split("@");
	tml+= '<a href="../serve/serve_xq.html?id=' + json[i].id + '" ><div class="mui-card-header mui-card-media">' +
						'<img src="' + APP.pic_url + strs[0] + '" />' +
						'<div class="mui-media-body" style="width:50%;">' + json[i].title + '<p>分类：农家乐</p></div></div></a>';
					}
					document.getElementById("pintuan_ul").innerHTML+=tml;
					
			}
		});
	}
</script>